package arcade;

/**
 * Trait
 * 
 * A trait is a key-value pair which is used by the player class. Traits are
 * contained in the player and then used by the view to generate feedback for
 * the user. Uses for traits are number of player lives, player score, etc.
 * 
 * @author Alexander Schearer <aas11@duke.edu>
 * 
 */
public class Trait extends RolePlayer {

	private int myValue;

	public Trait(String n) {
		super(n);
		myValue = 0;
	}

	public Trait(String n, int v) {
		super(n);
		myValue = v;
	}

	public void update(int value) {
		myValue += value;
	}

	@Override
	public String toString() {
		return getRole() + ": " + myValue;
	}

}
